package com.fileshare.web.dto.Bo;

import com.fileshare.web.entity.Role;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RoleBo {
    private Integer id;
    private String roleName;

    public static Role toEntity(RoleBo roleBo) {
        Role role = new Role();
        BeanUtils.copyProperties(roleBo, role);
        return role;
    }

}
